testsuite: Add render tests for all the empty nodes
authorBenjamin Otte <otte@redhat.com>
Mon, 20 May 2019 01:32:30 +0000 (03:32 +0200)
committerBenjamin Otte <otte@redhat.com>
Tue, 21 May 2019 04:43:59 +0000 (06:43 +0200)
Test that rendering empty nodes succees. For a lot of nodes the
resulting rendering isn't clearly defined, in those cases we overdraw
those regions (sometimes the whole image) with black.

39 files changed:
testsuite/gsk/compare/empty-blend.node [new file with mode: 0644]
testsuite/gsk/compare/empty-blend.png [new file with mode: 0644]
testsuite/gsk/compare/empty-blur.node [new file with mode: 0644]
testsuite/gsk/compare/empty-blur.png [new file with mode: 0644]
testsuite/gsk/compare/empty-border.node [new file with mode: 0644]
testsuite/gsk/compare/empty-border.png [new file with mode: 0644]
testsuite/gsk/compare/empty-clip.node [new file with mode: 0644]
testsuite/gsk/compare/empty-clip.png [new file with mode: 0644]
testsuite/gsk/compare/empty-color-matrix.node [new file with mode: 0644]
testsuite/gsk/compare/empty-color-matrix.png [new file with mode: 0644]
testsuite/gsk/compare/empty-color.node [new file with mode: 0644]
testsuite/gsk/compare/empty-color.png [new file with mode: 0644]
testsuite/gsk/compare/empty-container.node [new file with mode: 0644]
testsuite/gsk/compare/empty-container.png [new file with mode: 0644]
testsuite/gsk/compare/empty-cross-fade.node [new file with mode: 0644]
testsuite/gsk/compare/empty-cross-fade.png [new file with mode: 0644]
testsuite/gsk/compare/empty-debug.node [new file with mode: 0644]
testsuite/gsk/compare/empty-debug.png [new file with mode: 0644]
testsuite/gsk/compare/empty-inset-shadow.node [new file with mode: 0644]
testsuite/gsk/compare/empty-inset-shadow.png [new file with mode: 0644]
testsuite/gsk/compare/empty-linear-gradient.node [new file with mode: 0644]
testsuite/gsk/compare/empty-linear-gradient.png [new file with mode: 0644]
testsuite/gsk/compare/empty-opacity.node [new file with mode: 0644]
testsuite/gsk/compare/empty-opacity.png [new file with mode: 0644]
testsuite/gsk/compare/empty-outset-shadow.node [new file with mode: 0644]
testsuite/gsk/compare/empty-outset-shadow.png [new file with mode: 0644]
testsuite/gsk/compare/empty-repeat.node [new file with mode: 0644]
testsuite/gsk/compare/empty-repeat.png [new file with mode: 0644]
testsuite/gsk/compare/empty-rounded-clip.node [new file with mode: 0644]
testsuite/gsk/compare/empty-rounded-clip.png [new file with mode: 0644]
testsuite/gsk/compare/empty-shadow.node [new file with mode: 0644]
testsuite/gsk/compare/empty-shadow.png [new file with mode: 0644]
testsuite/gsk/compare/empty-text.node [new file with mode: 0644]
testsuite/gsk/compare/empty-text.png [new file with mode: 0644]
testsuite/gsk/compare/empty-texture.node [new file with mode: 0644]
testsuite/gsk/compare/empty-texture.png [new file with mode: 0644]
testsuite/gsk/compare/empty-transform.node [new file with mode: 0644]
testsuite/gsk/compare/empty-transform.png [new file with mode: 0644]
testsuite/gsk/meson.build

diff --git a/testsuite/gsk/compare/empty-blend.node b/testsuite/gsk/compare/empty-blend.node
new file mode 100644 (file)
index 0000000..291d805
--- /dev/null
@@ -0,0 +1 @@
+blend { }
diff --git a/testsuite/gsk/compare/empty-blend.png b/testsuite/gsk/compare/empty-blend.png
new file mode 100644 (file)
index 0000000..3a032a3
Binary files /dev/null and b/testsuite/gsk/compare/empty-blend.png differ
diff --git a/testsuite/gsk/compare/empty-blur.node b/testsuite/gsk/compare/empty-blur.node
new file mode 100644 (file)
index 0000000..a4a6298
--- /dev/null
@@ -0,0 +1,20 @@
+blur { }
+
+/* The blur algorithm isn't specified, so
+   don't test it. */
+color {
+  bounds: -3 -3 50 6;
+  color: black;
+}
+color {
+  bounds: 47 -3 6 50;
+  color: black;
+}
+color {
+  bounds: 3 47 50 6;
+  color: black;
+}
+color {
+  bounds: -3 3 6 50;
+  color: black;
+}
diff --git a/testsuite/gsk/compare/empty-blur.png b/testsuite/gsk/compare/empty-blur.png
new file mode 100644 (file)
index 0000000..313d6d8
Binary files /dev/null and b/testsuite/gsk/compare/empty-blur.png differ
diff --git a/testsuite/gsk/compare/empty-border.node b/testsuite/gsk/compare/empty-border.node
new file mode 100644 (file)
index 0000000..0a58c89
--- /dev/null
@@ -0,0 +1 @@
+border { }
diff --git a/testsuite/gsk/compare/empty-border.png b/testsuite/gsk/compare/empty-border.png
new file mode 100644 (file)
index 0000000..5d3e0fd
Binary files /dev/null and b/testsuite/gsk/compare/empty-border.png differ
diff --git a/testsuite/gsk/compare/empty-clip.node b/testsuite/gsk/compare/empty-clip.node
new file mode 100644 (file)
index 0000000..c513eb6
--- /dev/null
@@ -0,0 +1 @@
+clip { }
diff --git a/testsuite/gsk/compare/empty-clip.png b/testsuite/gsk/compare/empty-clip.png
new file mode 100644 (file)
index 0000000..3a032a3
Binary files /dev/null and b/testsuite/gsk/compare/empty-clip.png differ
diff --git a/testsuite/gsk/compare/empty-color-matrix.node b/testsuite/gsk/compare/empty-color-matrix.node
new file mode 100644 (file)
index 0000000..c0fcc1c
--- /dev/null
@@ -0,0 +1 @@
+color-matrix { }
diff --git a/testsuite/gsk/compare/empty-color-matrix.png b/testsuite/gsk/compare/empty-color-matrix.png
new file mode 100644 (file)
index 0000000..3a032a3
Binary files /dev/null and b/testsuite/gsk/compare/empty-color-matrix.png differ
diff --git a/testsuite/gsk/compare/empty-color.node b/testsuite/gsk/compare/empty-color.node
new file mode 100644 (file)
index 0000000..adaf509
--- /dev/null
@@ -0,0 +1 @@
+color { }
diff --git a/testsuite/gsk/compare/empty-color.png b/testsuite/gsk/compare/empty-color.png
new file mode 100644 (file)
index 0000000..3a032a3
Binary files /dev/null and b/testsuite/gsk/compare/empty-color.png differ
diff --git a/testsuite/gsk/compare/empty-container.node b/testsuite/gsk/compare/empty-container.node
new file mode 100644 (file)
index 0000000..2ab6cf0
--- /dev/null
@@ -0,0 +1,8 @@
+container { }
+
+/* We need to contain something because 0x0 nodes
+   cause NULL textures */
+color {
+  bounds: -1 -1 1 1;
+  color: transparent;
+}
diff --git a/testsuite/gsk/compare/empty-container.png b/testsuite/gsk/compare/empty-container.png
new file mode 100644 (file)
index 0000000..7238a64
Binary files /dev/null and b/testsuite/gsk/compare/empty-container.png differ
diff --git a/testsuite/gsk/compare/empty-cross-fade.node b/testsuite/gsk/compare/empty-cross-fade.node
new file mode 100644 (file)
index 0000000..1b69ede
--- /dev/null
@@ -0,0 +1,9 @@
+cross-fade { }
+
+/* This is not very useful as a test, because the
+   resulting color is undefined, because 0.5 * 255
+   can be rounded to either 127 or 128 by the renderers.
+   But at least we know they get the size right... */
+color {
+  color: black;
+}
diff --git a/testsuite/gsk/compare/empty-cross-fade.png b/testsuite/gsk/compare/empty-cross-fade.png
new file mode 100644 (file)
index 0000000..68e443c
Binary files /dev/null and b/testsuite/gsk/compare/empty-cross-fade.png differ
diff --git a/testsuite/gsk/compare/empty-debug.node b/testsuite/gsk/compare/empty-debug.node
new file mode 100644 (file)
index 0000000..088a305
--- /dev/null
@@ -0,0 +1 @@
+debug { }
diff --git a/testsuite/gsk/compare/empty-debug.png b/testsuite/gsk/compare/empty-debug.png
new file mode 100644 (file)
index 0000000..3a032a3
Binary files /dev/null and b/testsuite/gsk/compare/empty-debug.png differ
diff --git a/testsuite/gsk/compare/empty-inset-shadow.node b/testsuite/gsk/compare/empty-inset-shadow.node
new file mode 100644 (file)
index 0000000..5b84e7c
--- /dev/null
@@ -0,0 +1 @@
+inset-shadow { }
diff --git a/testsuite/gsk/compare/empty-inset-shadow.png b/testsuite/gsk/compare/empty-inset-shadow.png
new file mode 100644 (file)
index 0000000..b159674
Binary files /dev/null and b/testsuite/gsk/compare/empty-inset-shadow.png differ
diff --git a/testsuite/gsk/compare/empty-linear-gradient.node b/testsuite/gsk/compare/empty-linear-gradient.node
new file mode 100644 (file)
index 0000000..ef6234b
--- /dev/null
@@ -0,0 +1 @@
+linear-gradient { }
diff --git a/testsuite/gsk/compare/empty-linear-gradient.png b/testsuite/gsk/compare/empty-linear-gradient.png
new file mode 100644 (file)
index 0000000..f0e1db0
Binary files /dev/null and b/testsuite/gsk/compare/empty-linear-gradient.png differ
diff --git a/testsuite/gsk/compare/empty-opacity.node b/testsuite/gsk/compare/empty-opacity.node
new file mode 100644 (file)
index 0000000..ef197ad
--- /dev/null
@@ -0,0 +1,9 @@
+opacity { }
+
+/* This is not very useful as a test, because the
+   resulting color is undefined, because 0.5 * 255
+   can be rounded to either 127 or 128 by the renderers.
+   But at least we know they get the size right... */
+color {
+  color: black;
+}
diff --git a/testsuite/gsk/compare/empty-opacity.png b/testsuite/gsk/compare/empty-opacity.png
new file mode 100644 (file)
index 0000000..68e443c
Binary files /dev/null and b/testsuite/gsk/compare/empty-opacity.png differ
diff --git a/testsuite/gsk/compare/empty-outset-shadow.node b/testsuite/gsk/compare/empty-outset-shadow.node
new file mode 100644 (file)
index 0000000..87858be
--- /dev/null
@@ -0,0 +1 @@
+outset-shadow { }
diff --git a/testsuite/gsk/compare/empty-outset-shadow.png b/testsuite/gsk/compare/empty-outset-shadow.png
new file mode 100644 (file)
index 0000000..3a5fd99
Binary files /dev/null and b/testsuite/gsk/compare/empty-outset-shadow.png differ
diff --git a/testsuite/gsk/compare/empty-repeat.node b/testsuite/gsk/compare/empty-repeat.node
new file mode 100644 (file)
index 0000000..9f82f0e
--- /dev/null
@@ -0,0 +1 @@
+repeat { }
diff --git a/testsuite/gsk/compare/empty-repeat.png b/testsuite/gsk/compare/empty-repeat.png
new file mode 100644 (file)
index 0000000..3a032a3
Binary files /dev/null and b/testsuite/gsk/compare/empty-repeat.png differ
diff --git a/testsuite/gsk/compare/empty-rounded-clip.node b/testsuite/gsk/compare/empty-rounded-clip.node
new file mode 100644 (file)
index 0000000..28373aa
--- /dev/null
@@ -0,0 +1 @@
+rounded-clip { }
diff --git a/testsuite/gsk/compare/empty-rounded-clip.png b/testsuite/gsk/compare/empty-rounded-clip.png
new file mode 100644 (file)
index 0000000..3a032a3
Binary files /dev/null and b/testsuite/gsk/compare/empty-rounded-clip.png differ
diff --git a/testsuite/gsk/compare/empty-shadow.node b/testsuite/gsk/compare/empty-shadow.node
new file mode 100644 (file)
index 0000000..3f48793
--- /dev/null
@@ -0,0 +1 @@
+shadow { }
diff --git a/testsuite/gsk/compare/empty-shadow.png b/testsuite/gsk/compare/empty-shadow.png
new file mode 100644 (file)
index 0000000..47617ce
Binary files /dev/null and b/testsuite/gsk/compare/empty-shadow.png differ
diff --git a/testsuite/gsk/compare/empty-text.node b/testsuite/gsk/compare/empty-text.node
new file mode 100644 (file)
index 0000000..5964c4e
--- /dev/null
@@ -0,0 +1 @@
+text { }
diff --git a/testsuite/gsk/compare/empty-text.png b/testsuite/gsk/compare/empty-text.png
new file mode 100644 (file)
index 0000000..cd7cd8a
Binary files /dev/null and b/testsuite/gsk/compare/empty-text.png differ
diff --git a/testsuite/gsk/compare/empty-texture.node b/testsuite/gsk/compare/empty-texture.node
new file mode 100644 (file)
index 0000000..ba8d2d4
--- /dev/null
@@ -0,0 +1,12 @@
+texture { }
+
+/* The bilinear filtering code can differ
+   between implementations, so cover it */
+color {
+  bounds: 21 0 10 50;
+  color: black;
+}
+color {
+  bounds: 0 21 50 10;
+  color: black;
+}
diff --git a/testsuite/gsk/compare/empty-texture.png b/testsuite/gsk/compare/empty-texture.png
new file mode 100644 (file)
index 0000000..bb5a606
Binary files /dev/null and b/testsuite/gsk/compare/empty-texture.png differ
diff --git a/testsuite/gsk/compare/empty-transform.node b/testsuite/gsk/compare/empty-transform.node
new file mode 100644 (file)
index 0000000..4833ddb
--- /dev/null
@@ -0,0 +1 @@
+transform { }
diff --git a/testsuite/gsk/compare/empty-transform.png b/testsuite/gsk/compare/empty-transform.png
new file mode 100644 (file)
index 0000000..3a032a3
Binary files /dev/null and b/testsuite/gsk/compare/empty-transform.png differ
index e2e03282844000954ab2860494f28475ee78c3cf..cecc0ebed041b13d7f62f88f0ec48d7dff4d02e7 100644 (file)
@@ -32,6 +32,25 @@ compare_render_tests = [
   'clipped_rounded_clip',
   'color-blur0',
   'cross-fade-in-opacity',
+  'empty-blend',
+  'empty-blur',
+  'empty-border',
+  'empty-clip',
+  'empty-color',
+  'empty-color-matrix',
+  'empty-container',
+  'empty-cross-fade',
+  'empty-debug',
+  'empty-inset-shadow',
+  'empty-linear-gradient',
+  'empty-opacity',
+  'empty-outset-shadow',
+  'empty-repeat',
+  'empty-rounded-clip',
+  'empty-shadow',
+  'empty-text',
+  'empty-texture',
+  'empty-transform',
   'opacity_clip',
   'outset_shadow_offset_both',
   'outset_shadow_offset_x',